package game.logic.rules;

import game.logic.Table;

/**
 * An interface that represents a rule.  Rules may regard how cups are turned on/off when
 * shots are made, how the game is won, and other things not yet defined.
 * @author Justin
 *
 */
public abstract class Rule 
{	
	private Table theTable;
	
	
	
	/**
	 * Constructor for the rule.
	 * @param theTable - the table object managing the game.
	 */
	public Rule(Table theTable)
	{
		this.theTable = theTable;
	}
	
	/**
	 *  Executes the given rule.
	 *  @param parameters - the list of parameters we are passing to this rule.
	 *  @return - an object we want to return from a rule.  Will probably be a boolean for
	 *  the most part.
	 */
	public abstract Object executeRule(Object[] parameters);
	
	/**
	 *  Gets the table.
	 *  @return - the current state of the table.
	 */
	public Table getTable()
	{
		return theTable;
	}
}
